package org.ainlolcat.ainscience2.model.impl;

import org.ainlolcat.ainscience2.controller.loader.LoaderDefinition;
import org.ainlolcat.ainscience2.model.Configuration;
import org.ainlolcat.ainscience2.model.filter.Filter;
import org.ainlolcat.ainscience2.model.filter.FilterApplier;

import java.util.Collection;
import java.util.Vector;

/**
 * Created by IntelliJ IDEA.
 * User: ain
 * Date: 17.06.12
 * Time: 1:57
 * To change this template use File | Settings | File Templates.
 */
public class ConfigurationImpl implements Configuration {
    private Collection<LoaderDefinition> definitions = new Vector<LoaderDefinition>();

    public Collection<LoaderDefinition> getDefinitions(Filter... filters) {
        return new FilterApplier().apply(definitions, filters);
    }

    public void addDefinition(LoaderDefinition definition) {
        definitions.add(definition);
    }
}
